import com.beans.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        //先获取Spring上下文
        ApplicationContext context = new ClassPathXmlApplicationContext("Spring-config.xml");
        //获取bean对象
        UserController userController = context.getBean("userController",UserController.class);
        //使用bean
        userController.sayHai();
    }
}
